package com.sgb.member.ui.adapter;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.sgb.member.BR;
import com.sgb.member.R;
import com.sgb.member.entity.MemberLeverBean;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;

import java.util.List;

public class MemberLeverSettingAdapter extends BaseRecycleAdapter<MemberLeverBean> {

    public MemberLeverSettingAdapter(Context context, List<MemberLeverBean> datas) {
        super(context, R.layout.item_member_lever_setting, datas);
    }

    @Override
    public void convert(ItemViewHolder holder, MemberLeverBean bean) {
        holder.setBinding(BR.itemBean, bean);
        TextView textView = holder.getItem().findViewById(R.id.tv_edit);
        textView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onEditClick(holder.getPosition(), bean);
            }
        });

        TextView tvLook = holder.getItem().findViewById(R.id.tv_look);
        tvLook.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onLookClick(holder.getPosition(), bean);
            }
        });
    }

    protected void onEditClick(int position, MemberLeverBean bean) {

    }

    protected void onLookClick(int position, MemberLeverBean bean) {

    }
}

